/*
 * Developer : Jack Matthews
 * Email: developer@droidprofessor.com
 * 
 * Copyright (C) 2010 http://droidprofessor.com
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.droidprofessor.android.library.phonelicenses;


import com.droidprofessor.android.licensegenerator.client.AndroidClientLicenseImpl;

import android.app.Activity;
import android.os.Bundle;
import android.view.Window;
import android.webkit.WebView;



public class ActivityCrossPromotion extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		
		 WebView webview = new WebView(this);
		 
		 
		 // Let's display the progress in the activity title bar, like the
		 // browser app does.
		 getWindow().requestFeature(Window.FEATURE_PROGRESS);

//		 webview.getSettings().setJavaScriptEnabled(true);
//
//		 final Activity activity = this;
//		 
//		 webview.setWebChromeClient(new WebChromeClient() {
//		   public void onProgressChanged(WebView view, int progress) {
//		     // Activities and WebViews measure progress with different scales.
//		     // The progress meter will automatically disappear when we reach 100%
//		     activity.setProgress(progress * 1000);
//		   }
//		 });
//		 
//		 webview.setWebViewClient(new WebViewClient() {
//		   public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {
//		     Toast.makeText(activity, "Oh no! " + description, Toast.LENGTH_SHORT).show();
//		   }
//		 });
		 
		 setContentView(webview);
		 webview.loadUrl(AndroidClientLicenseImpl.getInstance().getCrossPromotionUri().toString());

	}

}
